package com.java80.springmall.cloud.order.consumer.client;

import java.util.List;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.java80.springmall.cloud.order.consumer.entity.Product;

@FeignClient(value="mall-product-provider",fallback=ProductClientFallBack.class)
public interface ProductClient {
	@GetMapping("/product/findAll")
	public List<Product> findAll( );
	@PostMapping("/product/updateStored")
	public boolean updateStored(@RequestParam("productId")long productId,@RequestParam("nums")int nums);
	@GetMapping("/product/get")
	public Product get(@RequestParam("id")long id);
}
